/**
 * 作者: 会写BUG
 * 创作日期: 2025/3/26 22:31
 * 描述: cwbQtPractice.ScorePanel
 *
 *
 **/

#pragma once

#include <QWidget>

QT_BEGIN_NAMESPACE
class QLabel;
QT_END_NAMESPACE

class GameButton;

class ScorePanel
    : public QWidget
{
    Q_OBJECT

public:
    explicit ScorePanel(QWidget* _parent = nullptr);
    ~ScorePanel() override;

Q_SIGNALS:
    /* 点击菜单按钮 */
    void menuClicked();

protected:
    void paintEvent(QPaintEvent* event) override;

private Q_SLOTS:
    /* 更新数值 */
    void updateScore();

private:
    void initUI();
    void initConnect();

private:
    /* 当前分数 */
    QLabel* score_label_ = nullptr;
    /* 最高分数 */
    QLabel* top_score_label_ = nullptr;
    /* 撤销 */
    GameButton* undo_btn_ = nullptr;
    /* 菜单 */
    GameButton* menu_btn_ = nullptr;

};
